
#pragma once

#ifndef UDBLOFTOPTIONS_H
#define UDBLOFTOPTIONS_H

#include "zdbmain.h"
#include "zdbsubeid.h"
#include "zgepnt3d.h"
#include "zgevec3d.h"
#include "zdbbody.h"

#pragma pack(push, 8)

class UcDbLoftOptions
{
public:
    UcDbLoftOptions ();
    UcDbLoftOptions ( const UcDbLoftOptions& src );
    ~UcDbLoftOptions ();
    UcDbLoftOptions& operator = ( const UcDbLoftOptions& src );

    enum NormalOption {
            kNoNormal,
            kFirstNormal,
            kLastNormal,
            kEndsNormal,
            kAllNormal,
            kUseDraftAngles
    };

    double  draftStart () const;
    void  setDraftStart ( double ang );
    double  draftEnd () const;
    void  setDraftEnd ( double ang );
    double  draftStartMag () const;
    void  setDraftStartMag ( double val );
    double  draftEndMag () const;
    void  setDraftEndMag ( double val );
    bool  arcLengthParam () const;
    void  setArcLengthParam ( bool val );
    bool  noTwist () const;
    void  setNoTwist ( bool val );
    bool  alignDirection () const;
    void  setAlignDirection ( bool val );
    bool  simplify () const;
    void  setSimplify ( bool val );
    bool  closed () const;
    void  setClosed ( bool val );
    bool  ruled () const;
    void  setRuled ( bool val );
    bool  virtualGuide () const;
    void  setVirtualGuide ( bool val );
    UcDbLoftOptions::NormalOption  normal () const;
    void  setNormal ( UcDbLoftOptions::NormalOption val );
    Ucad::ErrorStatus  setOptionsFromSysvars ();
    Ucad::ErrorStatus  setSysvarsFromOptions ();
    Ucad::ErrorStatus  checkOptions ( bool displayErrorMessages = false  );
    Ucad::ErrorStatus checkLoftCurves (
        UcArray<UcDbEntity*>& crossSectionCurves,
        UcArray<UcDbEntity*>& guideCurves,
        UcDbEntity* pPathCurve,
        bool& allOpen, bool& allClosed, bool& allPlanar,
        bool displayErrorMessages = false );
    Ucad::ErrorStatus checkCrossSectionCurves (
        UcArray<UcDbEntity*>& crossSectionCurves,
        bool& allOpen, bool& allClosed, bool& allPlanar,
        bool displayErrorMessages = false );
    Ucad::ErrorStatus checkGuideCurves ( UcArray<UcDbEntity*>& guideCurves,
                                         bool displayErrorMessages = false );
    Ucad::ErrorStatus checkPathCurve ( UcDbEntity *pPathCurve,
                                       bool displayErrorMessages = false );

private:
    void *mpImpLoftOptions;
    friend class UcDbImpLoftOptions;
};

#pragma pack(pop)

#endif 
